﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SlimDX;
using ThreeDI.UI;
using ThreeDI.UI.Meshs;
namespace ThreeDI.UI.Abstraction
{
    class DesktopDescriptor
    {
       // this meshList has all the names of meshes in the screan

        List<IconMesh> MeshList = new List<Meshs.IconMesh>();

        public DesktopDescriptor(Application myapp)
        {
            MeshList.Add(new IconMesh(@".\Assets\Tiger\tiger.x", myapp, -1, -3, -2, 0, 0, 0, 1));
            //MeshList.Add(new IconMesh(@".\Assets\Tiger\tiger.x", myapp, 1, 0, 0, 0, 0, 0, 1));
            //MeshList.Add(new IconMesh(@".\Assets\Tiger\tiger.x", myapp, 3, -2, 0, 0, 0, 0, 1));
            //MeshList.Add(new IconMesh(@".\Assets\Tiger\tiger.x", myapp, 0, 0, -10, 0, 0, 0, 1));
            //MeshList.Add(new IconMesh(@".\Assets\doc\books\book.x", myapp, 0.5f, 1f, 0, 0, 0, 0, 4f));
            //MeshList.Add(new IconMesh(@".\Assets\doc\books\book.x", myapp, -2, 0.5f, 1, 0, 0, 0, 4f));
            //MeshList.Add(new IconMesh(@".\Assets\doc\books\book.x", myapp, 3, 0.5f, 1, -4, 0, 0, 4f));
            //MeshList.Add(new IconMesh(@".\Assets\doc\books\book.x", myapp, 1, 1.5f, 4, 2, 0, 0, 4f));
            //MeshList.Add(new IconMesh(@".\Assets\doc\books\book.x", myapp, -3, 8, 3, 0, 0, 0, 4));
          //  MeshList.Add(new IconMesh(@".\Assets\doc\books\book.x", myapp, -3, 8, 3, 0, 0, 0, 1));
            MeshList.Add(new IconMesh(@".\Assets\ball\Sphere.x", myapp, 0.5f, 1f, -7, 0, 0, 0, 0.1f));
            MeshList.Add(new IconMesh(@".\Assets\ball\Sphere.x", myapp, -2, 0.5f, -5, 0, 0, 0, 0.1f));
            MeshList.Add(new IconMesh(@".\Assets\ball\Sphere.x", myapp, 3, 0.5f, -5, -4, 0, 0, 0.1f));
            MeshList.Add(new IconMesh(@".\Assets\ball\Sphere.x", myapp, 1, 1.5f, 2, 2, 0, 0, 0.1f));
            MeshList.Add(new IconMesh(@".\Assets\ball\Sphere.x", myapp, 0.5f, -1f, -4, 2, 0, 0, 0.1f));
            MeshList.Add(new IconMesh(@".\Assets\RedSphere\Sphere.x", myapp, 0.5f, -1f, -4, 2, 0, 0, 0.1f));
         //   MeshList.Add(new IconMesh(@".\Assets\Airplane\airplane 2.x", myapp, -2, 0.5f, 1, 0, 0, 0, 0.1f));
            
          // MeshList.Add(new IconMesh(@".\Assets\rabit\rabbit_x/rabbit.x",myapp, 0.5f, 1f, -7, 0, 0, 0, 0.1f));
            
        }
        public IconMesh getMeshIcon(int index )
        {
            return MeshList[index];
        }

        

        public void load()
        {
            foreach (IconMesh icon in MeshList)
            {
                icon.Load();
              
            }

        }

        public  void Render()
        {

            foreach (IconMesh icon in MeshList)
            {
                icon.Render();
            }
            
        }
    }
}
